//
//  CourseSearchBar.m
//  网易公开课项目
//
//  Created by 林 艺 on 13-11-19.
//  Copyright (c) 2013年 Marklin. All rights reserved.
//

#import "CourseSearchBar.h"

@implementation CourseSearchBar

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setBackgroundImage:[UIImage imageNamed:@"search_bg.png"]];
        UITextField *field = [self valueForKey:@"searchField"];
        field.placeholder = @"搜索全部课程";
        


    }
    return self;
}

- (void)_initSearchView
{
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 141, 25)];
    
    UIImageView *rightImageView = [[UIImageView alloc] initWithFrame:CGRectMake(137, 0, 4, 25)];
    rightImageView.image = [UIImage imageNamed:@"search_right.png"];
    UIImageView *centerImageView = [[UIImageView alloc] initWithFrame:CGRectMake(4, 0, 133, 25)];
    centerImageView.image = [UIImage imageNamed:@"search_center.png"];
    UIImageView *leftImageView = [[UIImageView alloc] initWithFrame:CGRectMake(137, 0, 4, 25)];
    leftImageView.image = [UIImage imageNamed:@"search_right.png"];
    leftImageView.transform = CGAffineTransformRotate(leftImageView.transform, 180*M_PI/180);
    
    [view addSubview:leftImageView];
    [view addSubview:centerImageView];
    [view addSubview:rightImageView];
    
}

@end
